Getting started¶
Installation¶
Install the package from nuget.
Usage¶
Setup¶
GameSense automatically starts when...
...GameDisplayName
...
...Developer
...
...GameName
...
...are set.
Note
Those three values are needed to register the events and the game in the GameSense Engine.
Note that GameName
is limited to uppercase A-Z, 0-9, hyphen, and underscore characters.
GameSense.Controller.GameName = "TEST";
GameSense.Controller.GameDisplayName = "Test";
GameSense.Controller.Developer = "John Doe";
Background animations for keyboards¶
Set the KeyboardBackground
property.
You can either use the KeyboardGradient
IKeyboardAnimator
or create you own IKeyboardAnimator
.
GameSense.Controller.KeyboardBackground = new KeyboardGradient (
new int[] { 255, 85, 0 },
new int[] { 0, 196, 255 },
4,
2
);
Background animations for mice¶
Not Implemented! Coming soon.
Background animations for mousepads¶
Not Implemented! Coming soon.
Animated key strokes¶
Set the DefaultKeyAnimation
property.
You can either use the KeyFade
IKeyAnimator
or create you own IKeyAnimator
.
GameSense.Controller.DefaultKeyAnimation = new KeyFade();
Warning
This program uses the globalmousekeyhook
library to register key strokes.
In order to not block the program you need to run a new application context after your setup when animating key strokes.
Your program could look something like this:
GameSense.Controller.GameName = "TEST";
GameSense.Controller.GameDisplayName = "Test";
GameSense.Controller.Developer = "John Doe";
GameSense.Controller.DefaultKeyAnimation = new KeyFade();
System.Windows.Forms.Application.Run(new ApplicationContext()); // Important!
GameSense.Controller.Stop();
System.Windows.Forms.Application.Exit()
Sending requests manually¶
To send a request to the GameSense Engine create a BaseRequest
and send it using the Transmitter
.
See the GameSense SDK docs for more information on requests.
GameSense.Struct.Request.BaseRequest request = new GameSense.Struct.BaseRequest
{
Game = "KALE"
};
GameSense.Transmitter.Send(request, "game_heartbeat");